package com.mscsoft.tools;

import com.mscsoft.App;

public class WebTools {
    public static void openWeb(String url) {
        try {
            java.net.URI uri = java.net.URI.create(url);
            java.awt.Desktop dp = java.awt.Desktop.getDesktop();
            if (dp.isSupported(java.awt.Desktop.Action.BROWSE)) {
                dp.browse(uri);// 获取系统默认浏览器打开链接
            }
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void openDownloadWeb() {
        WebTools.openWeb("http://" + App.properties.get("webAddr") + "/brainpower/show.php");
    }

    private WebTools() {
        throw new IllegalStateException("Utility class");
    }
}